<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="layui/css/layui.css" />
		<script src=""></script>
	</head>
	<body>
		<div style="width: 500px;height: 500px;background: red;"></div>
		<div  onclick="fhow(this)" style="width: 100px;height: 100px;border: solid 1px deepskyblue;margin-left: 200px;">上</div>
				<div  onclick="fhow(this)" style="width: 100px;height: 100px;border: solid 1px deepskyblue;margin-left: 200px;">上</div>
		<div  onclick="fhow(this)" style="width: 100px;height: 100px;border: solid 1px deepskyblue;margin-left: 200px;">上</div>
		
		
	
			
			<div>
				<img src="img/img2.jpg" aa="img/123.png" alt="" onclick="fhow(this)"/>
				
			</div>
			
	
		
		<div>
		<img src="img/123.png"  aa="img/img2.jpg" onclick="fhow(this)"/>
		</div>		
		
		
		
		
		
		<script src="layui/layui.all.js"></script>
		<script src="layui/lay/modules/layer.js"></script>
		<script>
	/*var div1=document.getElementById("div1");*/
	/*div1.onclick=function(){
			layer.tips('上',div1 , {
        tips: [1, '#0FA6D8'] //还可配置颜色
        });
	}
		*/
		function  fhow(onk){
			
			var content = "<img src="+ onk.getAttribute("aa") +"/>"
			layer.tips(content,onk , {
        tips: [4, 'transparent'] ,
        });
		}
		</script>
	</body>
</html>
